﻿using SqlSugar;

namespace InventoryIssue.Infrastructrue.Interface
{
    public interface IBaseRepository<T> where T : class,new()
    {
        Task<int> InsertAsync(T entity);
        Task<int> UpdateAsync(T entity);
        Task<int> DeleteAsync(T entity);
        ISugarQueryable<T> GetAll();
        Task<IEnumerable<T>> QueryAsync(string sql, object parameters = null);
        Task<T> QueryFirstOrDefaultAsync(string sql, object parameters = null);

    }
}
